-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworked parallel executor to not block #437
Conversation
aclysma
commented
Sep 5, 2020
- Added CountdownEvent - an awaitable counter that is ready after decremented N times
- System tasks are generated and await a ready_event
* Added CountdownEvent - an awaitable counter that is ready after decremented N times * System tasks are generated and await a ready_event
This is potentially a better fix for #405 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just finished my first pass. I'm pretty happy with how this turned out. I especially like that it improved the legibility / grok-ability of the code. I think this is probably good to go, but I'll spend a bit more time running it / poking + prodding.
Oh one comment about the ordering in CountdownTimer. Originally I left it all relaxed because there was always a SeqCst barrier being hit within Event that would apply to all memory. However adding the reset I'm not as certain as I was about the correctness, it's not necessarily great to be relying on an implementation detail within Event, and the ordering constraints should actually be free when there is a fence between them. (i.e. the if the fence is there, then the ordering constraints are satisfied and won't introduce any additional overhead.) (Not that it matters, these won't be under heavy contention.) |
This looks good to me! Thanks for the hard work here! |
Reworked parallel executor to not block